Release 10.1A: OpenEdge Getting Started:
Object-oriented Programming
Defining an object reference as a parameter
Procedures, user-defined functions, and class-based methods can all define object references as parameters. Object references are always passed by value. However, only a copy of the object reference is made, not the object itself. An object reference parameter cannot be passed to or from a remote application server (neither as a value nor as a field in a temp-table).
This is the syntax to define an object reference as a parameter for a method in a class or a user-defined function in a procedure:
This is the syntax to define an object reference as a parameter for a procedure:
Element descriptions for these syntax diagrams follow:
parameter-nameThe name of the parameter representing the object reference.
CLASSThe
CLASSkeyword is required iftype-nameconflicts with an abbreviation for a built in Progress data type, such asINT(INTEGER). Otherwise, it can optionally be used to clarify the readability of the statement.type-nameThe type name of the class or interface, which defines the data type of the parameter. For more information on type names, see the "Using the CLASS construct" section or the "Using the INTERFACE construct" section, respectively.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |